﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VoiceAI;
using VoiceAI.VoiceResponse;

namespace XiaoweiVoiceAI.ResponseCreators
{
    class VideoResponseCreatorForFullScreen
    {
        private class VideoResponseData : IPlayControlResponseData
        {
            public PlayControlType PlayControlType => PlayControlType.FullScreen;

            public PlayerType PlayerType => PlayerType.Video;

            public IPlayableResource PlayableResource { get; set; }

            public string PlayTittle { get; set; }

            public object PlayStateAdditionalMessage { get; set; }

            public ResponseType ResponseType => ResponseType.PlayControl;

            public ErrorCode ErrorCode => ErrorCode.NoError;

            public string RequestText { get; set; }
            public string ResponseText { get; set; }
            public string TTSUrl { get; set; }

            public bool RestoreInHistory { get; set; }

            public object DataContext { get; set; }

            public int? ControlValue { get; set; }
        }
        public static IResponseData CreateResponseData(XiaoweiVoiceAI xiaoweiVoiceAI, XiaoweiV2.ResponseParam param)
        {
            VideoResponseData videoResponseData = new VideoResponseData();
            videoResponseData.RequestText = param.RequestText;
            videoResponseData.ResponseText = "好的，为您调整为全屏播放";
            videoResponseData.TTSUrl = xiaoweiVoiceAI.TextToVoice("好的，为您调整为全屏播放");
            videoResponseData.RestoreInHistory = !string.IsNullOrEmpty(param.RequestText);
            return videoResponseData;
        }
    }
}
